home *** CD-ROM | disk | FTP | other *** search
/ Aminet 37 / Aminet 37 (2000)(Schatztruhe)[!][Jun 2000].iso / Aminet / biz / dopus / DOpus414JRsrc.lha / DirectoryOpus4 / Config / config.h < prev    next >
C/C++ Source or Header  |  2000-03-23  |  21KB  |  787 lines

  1. /*
  2.  
  3. Directory Opus 4
  4. Original GPL release version 4.12
  5. Copyright 1993-2000 Jonathan Potter
  6.  
  7. This program is free software; you can redistribute it and/or
  8. modify it under the terms of the GNU General Public License
  9. as published by the Free Software Foundation; either version 2
  10. of the License, or (at your option) any later version.
  11.  
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with this program; if not, write to the Free Software
  19. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  20.  
  21. All users of Directory Opus 4 (including versions distributed
  22. under the GPL) are entitled to upgrade to the latest version of
  23. Directory Opus version 5 at a reduced price. Please see
  24. http://www.gpsoft.com.au for more information.
  25.  
  26. The release of Directory Opus 4 under the GPL in NO WAY affects
  27. the existing commercial status of Directory Opus 5.
  28.  
  29. */
  30.  
  31. //#include <fctype.h>
  32. #include <string.h>
  33. #include <stdlib.h>
  34. #include <stdarg.h>
  35. #include <stddef.h>
  36. #include <exec/types.h>
  37. #include <exec/memory.h>
  38. #include <exec/execbase.h>
  39. #include <dos/dos.h>
  40. #include <dos/dosextens.h>
  41. #include <dos/exall.h>
  42. #include <intuition/intuitionbase.h>
  43. #include <intuition/sghooks.h>
  44. #include <graphics/gfxbase.h>
  45. #include <graphics/gfxmacros.h>
  46. #include <workbench/workbench.h>
  47. #include <workbench/startup.h>
  48. #include <proto/all.h>
  49.  
  50. #include <proto/dopus.h>
  51. #undef CONFIG_VERSION
  52.  
  53. #define NUM_MODULES 4
  54.  
  55. #define OSVER_34 0
  56. #define OSVER_37 1
  57. #define OSVER_38 2
  58. #define OSVER_39 3
  59. #define OSVER_40 4
  60.  
  61. #define GAD_BASE 1000
  62. #define STRING_BASE 10000
  63. #define REQ_BASE 11000
  64.  
  65. #define CONFIG_STRUCTURE_SIZE 9200
  66.  
  67. #define OLD_CONFIG_VERSION 9999
  68. #define CONFIG_VERSION 10000
  69. #define CONFIG_MAGIC 0xFACE
  70.  
  71. enum {
  72.     FONT_GENERAL,
  73.     FONT_DIRS,
  74.     FONT_TEXT,
  75.     FONT_GADGETS,
  76.     FONT_MENUS,
  77.     FONT_STATUS,
  78.     FONT_NAMES,
  79.     FONT_CLOCK,
  80.     FONT_REQUEST,
  81.     FONT_STRING,
  82.     FONT_ICONIFY,
  83.     FONT_SCREEN,
  84.  
  85.     FONT_COUNT};
  86.  
  87. #define FFLAG_8ONLY   1
  88. #define FFLAG_NOPROP  2
  89.  
  90. #define NUMFLAGS 16
  91. #define MAXFUNCS 32
  92. #define HIDDENLINES 6
  93.  
  94. #define FB_OUTPUTWIN    0
  95. #define FB_OUTPUTFILE   1
  96. #define FB_WB2F         2
  97. #define FB_DOPUS2F      3
  98. #define FB_RUNASYNC     4
  99. #define FB_CDSOURCE     5
  100. #define FB_CDDEST       6
  101. #define FB_DOALLFILES   7
  102. #define FB_RECURSEDIR   8
  103. #define FB_RELOADFILE   9
  104. #define FB_AUTOICONIFY  10
  105. #define FB_NOQUOTE      11
  106. #define FB_RESCANSOURCE 12
  107. #define FB_RESCANDEST   13
  108. #define FB_SHELLSTARTUP 14
  109. #define FB_DOPUSSTARTUP 15
  110.  
  111. #define FF_OUTPUTWIN    (1<<FB_OUTPUTWIN)
  112. #define FF_OUTPUTFILE   (1<<FB_OUTPUTFILE)
  113. #define FF_WB2F         (1<<FB_WB2F)
  114. #define FF_DOPUS2F      (1<<FB_DOPUS2F)
  115. #define FF_RUNASYNC     (1<<FB_RUNASYNC)   
  116. #define FF_CDSOURCE     (1<<FB_CDSOURCE)
  117. #define FF_CDDEST       (1<<FB_CDDEST)
  118. #define FF_DOALLFILES   (1<<FB_DOALLFILES)
  119. #define FF_RECURSEDIR   (1<<FB_RECURSEDIR)
  120. #define FF_RELOADFILE   (1<<FB_RELOADFILE)
  121. #define FF_AUTOICONIFY  (1<<FB_AUTOICONIFY)
  122. #define FF_NOQUOTE      (1<<FB_NOQUOTE)
  123. #define FF_RESCANSOURCE (1<<FB_RESCANSOURCE)
  124. #define FF_RESCANDEST   (1<<FB_RESCANDEST)
  125. #define FF_SHELLSTARTUP (1<<FB_SHELLSTARTUP)
  126. #define FF_DOPUSSTARTUP (1<<FB_DOPUSSTARTUP)
  127.  
  128. #define SFB_AUTOICONIFY  0
  129. #define SFB_CDDEST       1
  130. #define SFB_CDSOURCE     2
  131. #define SFB_DOPUS2F      3
  132. #define SFB_DOALLFILES   4
  133. #define SFB_DOPUSSTARTUP 5
  134. #define SFB_SHELLSTARTUP 6
  135. #define SFB_NOQUOTE      7
  136. #define SFB_OUTPUTFILE   8
  137. #define SFB_OUTPUTWIN    9
  138. #define SFB_RECURSEDIR   10
  139. #define SFB_RELOADFILE   11
  140. #define SFB_RESCANDEST   12
  141. #define SFB_RESCANSOURCE 13
  142. #define SFB_RUNASYNC     14
  143. #define SFB_WB2F         15
  144.  
  145. #define FT_INTERNAL     0
  146. #define FT_EXECUTABLE   1
  147. #define FT_WORKBENCH    2
  148. #define FT_BATCH        3
  149. #define FT_AREXX        4
  150.  
  151. #define FT_REQUESTER    5
  152. #define FT_CHDIR       99
  153.  
  154. #define FC_INTERNAL     '*'
  155. #define FC_WORKBENCH    '%'
  156. #define FC_BATCH        '$'
  157. #define FC_AREXX        '&'
  158. #define FC_REQUESTER    '@'
  159. #define FC_CHDIR        '!'
  160.  
  161. #define MENUCOUNT 100
  162. #define GADCOUNT 84
  163. #define DRIVECOUNT 32
  164. #define NUMFONTS 16
  165. #define USEDRIVECOUNT 30
  166.  
  167. #define FTYC_MATCH        1
  168. #define FTYC_MATCHNAME    2
  169. #define FTYC_MATCHBITS    3
  170. #define FTYC_MATCHCOMMENT 4
  171. #define FTYC_MATCHSIZE    5
  172. #define FTYC_MATCHDATE    6
  173. #define FTYC_MOVETO       7
  174. #define FTYC_MOVE         8
  175. #define FTYC_SEARCHFOR    9
  176. #define FTYC_OR         253
  177. #define FTYC_AND        254
  178. #define FTYC_ENDSECTION 255
  179.  
  180. #define FTYC_ENDLIMIT   252
  181. #define FTYC_COMMANDOK   10
  182. #define FTYC_CYCLEEND    12
  183.  
  184. #define FILETYPE_FUNCNUM   16
  185.  
  186. struct fileclass {
  187.     struct fileclass *last,*next;
  188.     char type[32];
  189.     char typeid[8];
  190.     unsigned char *recognition;
  191. };
  192.  
  193. struct dopusconfigmsg {
  194.     struct Message msg;
  195.     int command;
  196.     char *buffer;
  197. };
  198.  
  199. #define CONFIG_GET_CONFIG 1
  200. #define CONFIG_HERES_CONFIG 2
  201. #define CONFIG_ALL_DONE 3
  202. #define CONFIG_NEW_HOTKEY 4
  203. #define CONFIG_HOTKEYS_CHANGE 5
  204.  
  205. struct configconfig {
  206.     struct Config *config;
  207.     struct dopusfiletype *firsttype;
  208.     struct DOpusRemember *typekey;
  209.     struct dopusgadgetbanks *firstbank;
  210.     int changed;
  211.     char configname[256];
  212.     struct Window *Window;
  213.     struct Screen *Screen;
  214.     struct dopushotkey *firsthotkey;
  215. };
  216.  
  217. extern struct TagItem scr_taglist[];
  218. extern struct ExtNewScreen configscr;
  219. extern struct NewWindow configwin,requestwin;
  220. extern struct ExecBase *SysBase;
  221. extern struct DOpusBase *DOpusBase;
  222. extern struct GfxBase *GfxBase;
  223. extern struct DosLibrary *DOSBase;
  224. extern struct IntuitionBase *IntuitionBase;
  225. extern struct Screen *Screen;
  226. extern struct Window *Window;
  227. extern struct ViewPort *vp;
  228. extern struct RastPort *rp;
  229. extern struct Process *myproc;
  230. extern struct IntuiMessage *IMsg;
  231. extern APTR wsave,realwsave;
  232. extern char *spacestring;
  233. extern char fontbuf[50];
  234. extern struct TextAttr sfont,bsfont;
  235. extern struct Config *config,*undoconfig;
  236. extern struct dopusfiletype *firsttype;
  237. extern struct dopushotkey *firsthotkey;
  238. extern struct dopusgadgetbanks *firstbank,*curbank;
  239. extern struct DOpusRemember *typekey,*fontkey;
  240. extern char configname[256],loadnamebuf[256];
  241. extern char filebuf[FILEBUF_SIZE],dirbuf[258];
  242. extern struct DOpusFileReq filereq;
  243. extern int version2;
  244. extern struct MsgPort *conport,*cmdport,*appport;
  245. /*
  246. extern struct MsgPort *clip_port;
  247. extern struct IOClipReq *clip_io;
  248. */
  249. /*
  250. struct ConfigStuff {
  251.     struct Config *config;
  252.     struct DOpusRemember *typekey;
  253.     struct dopusfiletype *firsttype;
  254.     struct dopusgadgetbanks *firstbank,*curbank;
  255.     struct dopushotkey *firsthotkey;
  256. };
  257. */
  258. extern struct ConfigStuff cstuff;
  259. extern struct DOpusRemember *mainkey,*gadgetkey,*tickkey,*screenkey,*clipkey,*buttonkey;
  260. extern struct Gadget *maingad,*tickgad,*gadgads,*menugads,*drivegads;
  261. extern int tickcount;
  262. extern struct dopusconfigmsg msg;
  263.  
  264. extern struct TagItem taglist[2];
  265. extern UWORD drawinfo[];
  266. extern int lchanged,changed;
  267.  
  268. extern struct Image
  269.     *checkonimage,*checkoffimage,
  270.     *buttononimage,*buttonoffimage,
  271.     copy_checkonimage,copy_checkoffimage;
  272.  
  273. #define CTYPE_MOVEREL -3
  274. #define CTYPE_MOVE -2
  275. #define CTYPE_SKIP -1
  276. #define CTYPE_TEXT 1
  277. #define CTYPE_GAD  2
  278. #define CTYPE_STR  3
  279. #define CTYPE_REQ  4
  280. #define CTYPE_RAD  5
  281. #define CTYPE_MRAD  6
  282.  
  283. struct ConfigGadget {
  284.     char type;
  285.     char value;
  286.     int nameentry;
  287.     short x,y;
  288.     short w,h;
  289.     int bit;
  290.     int mutualex;
  291.     char *buffer;
  292.     struct Gadget *gad;
  293. };
  294.  
  295. #define CFG_MAINMENU  11
  296. #define CFG_GADGET    0
  297. #define CFG_DRIVE     1
  298. #define CFG_FILETYPE  2
  299. #define CFG_HOTKEYS   3
  300. #define CFG_MENU      4
  301. #define CFG_OPERATION 5
  302. #define CFG_SCREEN    6
  303. #define CFG_SYSTEM    7
  304. #define CFG_SAVE      8
  305. #define CFG_OKAY      9
  306. #define CFG_CANCEL    10
  307.  
  308. #define OP_COPY       0
  309. #define OP_DATEFORMAT 1
  310. #define OP_DELETE     2
  311. #define OP_ERRORCHECK 3
  312. #define OP_GENERAL    4
  313. #define OP_ICONS      5
  314. #define OP_FORMAT     6
  315. #define OP_UPDATE     7
  316. #define OP_OKAY       8
  317. #define OP_CANCEL     9
  318.  
  319. #define SYS_AMIGADOS    0
  320. #define SYS_CLOCK       1
  321. #define SYS_DIRECTORIES 2
  322. #define SYS_HOTKEYS     3
  323. #define SYS_ICONS       4
  324. #define SYS_MODULES     5
  325. #define SYS_SHOWPATTERN 6
  326. #define SYS_STARTUP     7
  327. #define SYS_VIEWPLAY    8
  328. #define SYS_OKAY        9
  329. #define SYS_CANCEL      10
  330.  
  331. #define GAD_NEXTBANK     0
  332. #define GAD_NEWBANK      1
  333. #define GAD_COPYBANK     2
  334. #define GAD_SWAPBANK     3
  335. #define GAD_DELETEBANK   4
  336. #define GAD_COPYGADGET   5
  337. #define GAD_SWAPGADGET   6
  338. #define GAD_DELETEGADGET 7
  339. #define GAD_OKAY         8
  340. #define GAD_CANCEL       9
  341.  
  342. #define MENU_COPYMENU    0
  343. #define MENU_SWAPMENU    1
  344. #define MENU_DELETEMENU  2
  345. #define MENU_SORTMENU    3
  346. #define MENU_INSERTITEM  4
  347. #define MENU_COPYITEM    5
  348. #define MENU_SWAPITEM    6
  349. #define MENU_DELETEITEM  7
  350. #define MENU_OKAY        8
  351. #define MENU_CANCEL      9
  352. #define MENU_MOVEUP     10
  353. #define MENU_MOVEDOWN   11
  354. #define MENU_SLIDER     12
  355.  
  356. #define DRIVE_GETDRIVES   0
  357. #define DRIVE_COPYBANK    1
  358. #define DRIVE_SWAPBANK    2
  359. #define DRIVE_DELETEBANK  3
  360. #define DRIVE_SORTBANK    4
  361. #define DRIVE_COPYDRIVE   5
  362. #define DRIVE_SWAPDRIVE   6
  363. #define DRIVE_DELETEDRIVE 7
  364. #define DRIVE_OKAY        8
  365. #define DRIVE_CANCEL      9
  366. #define DRIVE_EDITNAME   10
  367. #define DRIVE_EDITSAMPLE 11
  368. #define DRIVE_EDITREQ    12
  369. #define DRIVE_EDITPATH   13
  370.  
  371. #define FILETYPE_NEW          0
  372. #define FILETYPE_SWAP         1
  373. #define FILETYPE_DELETE       2
  374. #define FILETYPE_OKAY         3
  375. #define FILETYPE_CANCEL       4
  376.  
  377. #define HOTKEYS_NEWHOTKEY     0
  378. #define HOTKEYS_DELETE        1
  379. #define HOTKEYS_DUPLICATE     2
  380. #define HOTKEYS_OKAY          3
  381. #define HOTKEYS_SWAP          4
  382. #define HOTKEYS_CANCEL        5
  383.  
  384. #define EDIT_OKAY             0
  385. #define EDIT_CANCEL           1
  386. #define EDIT_EDITCLASS        2
  387. #define EDIT_NAME             3
  388. #define EDIT_SAMPLE           4
  389. #define EDIT_NEWENTRY         5
  390. #define EDIT_DUPLICATE        6
  391. #define EDIT_SWAP             7
  392. #define EDIT_DELETE           8
  393. #define EDIT_STACK            9
  394. #define EDIT_PRIORITY        10
  395. #define EDIT_DELAY           11
  396. #define EDIT_TYPE            12
  397. #define EDIT_FUNC            13
  398. #define EDIT_REQUESTER       14
  399. #define EDIT_PATH            15
  400. #define EDIT_ARGREQ          16
  401. #define EDIT_FILETYPEACTION  17
  402.  
  403. #define CLASS_OKAY           0
  404. #define CLASS_CANCEL         1
  405. #define CLASS_TYPE           3
  406. #define CLASS_NEWENTRY       4
  407. #define CLASS_DUPLICATE      5
  408. #define CLASS_SWAP           6
  409. #define CLASS_DELETE         7
  410. #define CLASS_OPERATION      8
  411. #define CLASS_FUNC           9
  412. #define CLASS_FILEVIEWREQ    10
  413. #define CLASS_FILEVIEW       11
  414. #define CLASS_HEXDEC         12
  415. #define CLASS_VIEWSLIDER     13
  416. #define CLASS_VIEWUP         14
  417. #define CLASS_VIEWDOWN       15
  418. #define CLASS_TYPEID         16
  419.  
  420. #define EDIT_FUNCTIONS    1
  421. #define EDIT_FLAGS        2
  422. #define EDIT_FUNCTIONTYPE 3
  423.  
  424. #define SCREEN_ARROWS     0
  425. #define SCREEN_COLOURS    1
  426. #define SCREEN_FONTS      2
  427. #define SCREEN_GENERAL    3
  428. #define SCREEN_PALETTE    4
  429. #define SCREEN_SCREENMODE 5
  430. #define SCREEN_SLIDERS    6
  431. #define SCREEN_OKAY       7
  432. #define SCREEN_CANCEL     8
  433.  
  434. #define PALETTE_SLIDER    100
  435. #define PALETTE_STRING    103
  436.  
  437. #define COLOURS_SELECT    200
  438.  
  439. #define SCREENMODE_WIDTH      300
  440. #define SCREENMODE_HEIGHT     301
  441. #define SCREENMODE_DEPTH      302
  442. #define SCREENMODE_DEFWIDTH   303
  443. #define SCREENMODE_DEFHEIGHT  304
  444. #define SCREENMODE_HALFHEIGHT 305
  445. #define SCREENMODE_SLIDER     306
  446.  
  447. #define HOTKEY_SAMPLE     400
  448. #define HOTKEY_MMB        401
  449.  
  450. #define FORMAT_MAXNUM 9
  451.  
  452. #define FORMAT_WINDOW      500
  453. #define FORMAT_RESET       501
  454. #define FORMAT_CLEAR       502
  455. #define FORMAT_LENGTH      503
  456. #define FORMAT_SEPARATE    510
  457. #define FORMAT_REVERSESORT 511
  458.  
  459. #define ICON_ICONREQ       600
  460. #define ICON_ICONPATH      601
  461. #define ICON_TOOLREQ       602
  462. #define ICON_TOOLPATH      603
  463.  
  464. #define ARROWBASE          600
  465. #define ARROWCYCLE         610
  466.  
  467. #define FONT_SIZE 700
  468.  
  469. #define SCREEN_SLIDER_LEFTCYCLE 800
  470. #define SCREEN_SLIDER_RIGHTCYCLE 801
  471.  
  472. #define COLBIT_STATUS        0
  473. #define COLBIT_SELDISKNAME   1
  474. #define COLBIT_DISKNAME      2
  475. #define COLBIT_SELDIRECTORY  3
  476. #define COLBIT_DIRECTORY     4
  477. #define COLBIT_SELFILE       5
  478. #define COLBIT_FILE          6
  479. #define COLBIT_SLIDERS       7
  480. #define COLBIT_ARROWS        8
  481. #define COLBIT_TINYGADS      9
  482. #define COLBIT_CLOCK         10
  483. #define COLBIT_REQUESTER     11
  484. #define COLBIT_3DBOXES       12
  485. #define COLBIT_STRINGS       13
  486. #define COLBIT_SELSTRINGS    14
  487.  
  488. #define COLOURS_STATUS       (1<<COLBIT_STATUS)
  489. #define COLOURS_SELDISKNAME  (1<<COLBIT_SELDISKNAME)
  490. #define COLOURS_DISKNAME     (1<<COLBIT_DISKNAME)
  491. #define COLOURS_SELDIRECTORY (1<<COLBIT_SELDIRECTORY)
  492. #define COLOURS_DIRECTORY    (1<<COLBIT_DIRECTORY)
  493. #define COLOURS_SELFILE      (1<<COLBIT_SELFILE)
  494. #define COLOURS_FILE         (1<<COLBIT_FILE)
  495. #define COLOURS_SLIDERS      (1<<COLBIT_SLIDERS)
  496. #define COLOURS_ARROWS       (1<<COLBIT_ARROWS)
  497. #define COLOURS_TINYGADS     (1<<COLBIT_TINYGADS)
  498. #define COLOURS_CLOCK        (1<<COLBIT_CLOCK)
  499. #define COLOURS_REQUESTER    (1<<COLBIT_REQUESTER)
  500. #define COLOURS_3DBOXES      (1<<COLBIT_3DBOXES)
  501. #define COLOURS_STRINGS      (1<<COLBIT_STRINGS)
  502. #define COLOURS_SELSTRINGS   (1<<COLBIT_SELSTRINGS)
  503.  
  504. #define COLOURS_ALL          ~0
  505.  
  506. struct ColourSel {
  507.     char item;
  508.     short x1,y1,x2,y2;
  509. };
  510.  
  511. extern struct ColourSel coloursel[];
  512.  
  513. extern char
  514.     *mainmenugads[14],
  515.     *listviewgads[3],
  516.     *listviewgads2[4],
  517.     *operationgads[14],
  518.     *systemgads[14],
  519.     *gadgetgads[11],
  520.     *functypelist[],
  521.     ftype_funcmap[],
  522.     *functypestr[],
  523.     *editfuncgads[6],
  524.     *editfuncgads2[16],
  525.     *gadflaglist[17],
  526.     *editclassgads[10],
  527.     *menugadgets[11],
  528.     *drivegadgets[11],
  529.     *drivegadgets2[5],
  530.     *screengadgets[14],
  531.     *formatgadgets[10],
  532.     *hotkeygadgets[3],
  533.     *arrowgadtxt[4],
  534.     *arrowtypetxt[3],
  535.     *filetypeactiongadgets[11],
  536.  
  537.     *commandlist[95],
  538.     *arglist[18],
  539.     *classopslist[12],
  540.  
  541.     *formatnames[FORMAT_MAXNUM+1],
  542.     *selectedformatnames[FORMAT_MAXNUM+1],
  543.  
  544.     *defdir[],
  545.     *palettegadgets[],*coloursgadgets[],
  546.     *screenmodegadgets[],
  547.     *hotkeysgadgets[],
  548.     *windownames[2],*errorcheckingtxt[],*separatenames[3];
  549.  
  550. extern struct ConfigGadget
  551.     *operationgadgets[8],*systemgadgets[9],scr_generalgadgets[];
  552.  
  553.  
  554. #define UNDO_MAIN      1
  555. #define UNDO_GADGET    2
  556. #define UNDO_MENU      4
  557. #define UNDO_FILETYPE  8
  558. #define UNDO_DRIVE     16
  559. #define UNDO_HOTKEYS   32
  560. #define UNDO_ALL       (UNDO_MAIN|UNDO_GADGET|UNDO_MENU|UNDO_FILETYPE|UNDO_DRIVE|UNDO_HOTKEYS)
  561.  
  562. struct ConfigUndo {
  563.     struct Config *config;
  564.     struct newdopusfunction *menu;
  565.     struct dopusfunction *drive;
  566.     struct dopusfiletype *firsttype;
  567.     struct dopusgadgetbanks *firstbank;
  568.     struct DOpusRemember *key;
  569.     struct dopushotkey *firsthotkey;
  570.     char menutit[5][16];
  571. };
  572.  
  573. extern struct ConfigUndo *makeundo();
  574. extern char *getcopy(),*compilefunclist(),**makefiletypelist(),**makeclasslist();
  575. extern struct dopusgadgetbanks *lastbank();
  576.  
  577. extern int fontplaceflags[],fontplacevals[];
  578. extern struct RMBGadget nextbankrmb,insertbankrmb,formatclearrmb,sampleclearrmb;
  579. extern struct DOpusListView
  580.     editlists[3],cmdlist,screenmodeview,listlist,iconlistview,
  581.     fontsizelistview,fontlistview,fontplacelist,editclasslist,hotkeyslist,
  582.     helplist,filetypeactionlist,
  583.     modulelist,languagelist;
  584. extern char *external_module_list[],*external_module_name[];
  585. extern int external_module_map[];
  586.  
  587. extern struct Gadget
  588.     editfuncgadgets[15],cmdcancelgad,menuslidergads[3],editdrivegadgets[4],
  589.     palettegads[6],coloursgad,screenmodegads[7],editclassgadgets[14],
  590.     listokaygad[3],formatgads[10],hotkeygad,hotkeymmbgad,arrowgadgets[8],
  591.     fontsizegadget,helpgad,helpcancelgad,draggad,icongads[4],depthgads[2],
  592.     screen_sliders_gadgets[];
  593.  
  594. extern struct Image menusliderimage;
  595. extern struct PropInfo menusliderprop,paletteprop[3];
  596.  
  597. extern char
  598.     edit_namebuf[256],edit_stackbuf[7],edit_prioritybuf[5],edit_delaybuf[3],
  599.     edit_funcbuf[256],edit_pathbuf[256],edit_actionbuf[40],
  600.     palette_buf[3][4],screenwidth_buf[6],screenheight_buf[6],screendepth_buf[3],
  601.     formatlen_buf[5][3],fontsize_buf[12],edit_typeidbuf[8];
  602.  
  603. extern struct StringInfo namesinfo,funcsinfo;
  604.  
  605. #ifdef __SASC_60
  606. extern __chip USHORT
  607.     glass_data[2][18],uparrow_data[6],downarrow_data[6],
  608.     pageflip_data1[5],pageflip_data2[3];
  609. #else
  610. extern USHORT
  611.     __chip glass_data[2][18],
  612.     __chip uparrow_data[6],
  613.     __chip downarrow_data[6],
  614.     __chip leftarrow_data[6],
  615.     __chip rightarrow_data[6],
  616.     __chip pageflip_data1[5],
  617.     __chip pageflip_data2[3];
  618. #endif
  619.  
  620. extern struct IntuiMessage *getintuimsg();
  621.  
  622. extern struct newdopusfunction *selgad;
  623. extern struct Gadget *seligad;
  624.  
  625. struct ScreenMode {
  626.     struct ScreenMode *next;
  627.     char name[80];
  628.     UWORD minw,minh;
  629.     UWORD maxw,maxh;
  630.     UWORD defw,defh;
  631.     UWORD maxdepth;
  632.     ULONG mode;
  633. };
  634.  
  635. #define MODE_WORKBENCHUSE        1
  636. #define MODE_WORKBENCHCLONE      2
  637. #define MODE_PUBLICSCREENUSE     3
  638. #define MODE_PUBLICSCREENCLONE   4
  639.  
  640. extern char **screenmodelist;
  641. extern struct ScreenMode *firstmode,*screenmode;
  642. extern struct ScreenMode *showdisplaydesc(),*getscreenmode();
  643.  
  644. #define SCRFLAGS_DEFWIDTH   1
  645. #define SCRFLAGS_DEFHEIGHT  2
  646. #define SCRFLAGS_HALFHEIGHT 4
  647.  
  648. extern struct MenuItem
  649.     projectitems[],edititems[],gadrowsitems[],classitems[],neatstuffitem;
  650. extern struct Menu projectmenu,editmenu,gadrowsmenu,classmenu,neatstuffmenu;
  651.  
  652. extern int changed,curoperation,clipcount;
  653.  
  654. struct Clip {
  655.     struct Clip *next;
  656.     char name[256];
  657.     struct dopusfunction func;
  658. };
  659.  
  660. extern struct Clip *firstclip;
  661.  
  662. extern USHORT defpalettes[11][4],def_dopus_palette[16];
  663. extern struct DOpusListView palettelist,listformatlists[2];
  664. extern int rowtrans[5];
  665.  
  666. extern struct Library *DiskfontBase;
  667. extern struct Library *WorkbenchBase;
  668. extern struct Library *IconBase;
  669. extern struct PPBase *PPBase;
  670. extern struct TextFont *tfont;
  671. extern char
  672.     *fontdatabuf,**fontlist,*(**fontsizelist),
  673.     **noproplist,*(**nopropsizelist),
  674.     **only8list,*only8sizelist[];
  675.  
  676. extern int gadflagvals[];
  677.  
  678. extern struct fileclass *firstclass;
  679. extern int classopvals[];
  680. extern char classname[256];
  681. extern struct DOpusRemember *helpkey;
  682. extern char *helpbuffer;
  683. extern int helpsize;
  684. extern char currenthelpname[256];
  685.  
  686. extern char **fileclasslist;
  687. extern char *fileclasstype[];
  688. extern char maxlength[5];
  689.  
  690. extern struct StringExtend stringex;
  691.  
  692. extern struct DiskObject dropboxobj;
  693. extern void *appobject;
  694. extern struct AppMessage *appmsg;
  695.  
  696. #define MY_APPOBJECT 1
  697.  
  698. extern unsigned char *fileview_buf;
  699. extern int fileview_lines,fileview_size,fileview_topline,fileview_type,fileview_oldtop;
  700. extern int fileview_offset,fileview_position;
  701. extern char *fileview_types[];
  702.  
  703. extern char *icontypes[],*palettenames[14],*fontplacenames[FONT_COUNT+1];
  704.  
  705. extern struct IntuiText
  706.     newtext,opentext,savetext,saveastext,cuttext,copytext,
  707.     pastetext,erasetext,newclasstext,editclasstext,deleteclasstext,
  708.     clearclasstext,duplicateclasstext,clearcliptext,
  709.     gadrowstext[5],paintmodetext;
  710.  
  711. extern int network;
  712.  
  713. extern char *ftype_funcs[];
  714.  
  715. extern struct StringData stringdata;
  716.  
  717. extern short func_list_items[];
  718.  
  719. extern struct Border *gadget_dog_sel_border,*gadget_dog_unsel_border;
  720. extern struct Border *gadget_sel_border,*gadget_unsel_border;
  721.  
  722. extern int x_off,y_off,x_bot,y_bot;
  723. extern char help_ok;
  724. extern int paint_state,paint_fg,paint_bg;
  725.  
  726. extern int screen_depth;
  727.  
  728. extern short
  729.     editfuncgadgets_xy[15][2],
  730.     editdrivegadgets_xy[4][2],
  731.     menuslidergads_xy[3][2],
  732.     palettegads_xy[6][2],
  733.     coloursgad_xy[2],
  734.     screenmodegads_xy[7][2],
  735.     formatgads_xy[10][2],
  736.     icongads_xy[4][2],
  737.     hotkeymmbgad_xy[2],
  738.     hotkeygad_xy[2],
  739.     arrowgadgets_xy[8][2],
  740.     fontsizegadget_xy[2],
  741.     editclassgadgets_xy[14][2],
  742.     screen_sliders_gadgets_xy[2][2];
  743.  
  744. #define FTFUNC_AUTOFUNC1   0
  745. #define FTFUNC_AUTOFUNC2   1
  746. #define FTFUNC_DOUBLECLICK 2
  747. #define FTFUNC_CLICKMCLICK 3
  748. #define FTFUNC_ANSIREAD    4
  749. #define FTFUNC_AUTOFUNC3   5
  750. #define FTFUNC_HEXREAD     6
  751. #define FTFUNC_LOOPPLAY    7
  752. #define FTFUNC_PLAY        8
  753. #define FTFUNC_AUTOFUNC4   9
  754. #define FTFUNC_READ        10
  755. #define FTFUNC_SHOW        11
  756.  
  757. #define FREQ_FILETYPE  10
  758. #define FREQ_FILECLASS 11
  759. #define FREQ_ARGREQ    12
  760. #define FREQ_PATHREQ   20
  761. #define FREQ_GENERIC   21
  762.  
  763. struct ColourTable {
  764.     ULONG red;
  765.     ULONG green;
  766.     ULONG blue;
  767.     unsigned char pen;
  768.     char alloc;
  769. };
  770.  
  771. extern struct ColourTable screen_pens[16];
  772.  
  773. extern short colour_box_xy[2][16][4],colour_box_num;
  774.  
  775. extern struct ScreenMode *curmode;
  776. extern ULONG palette_backup[48];
  777. extern struct DOpusRemember *borderkey;
  778. extern short palettegad_xy[16][4];
  779. extern int bpg;
  780.  
  781. extern char *left_right_cycle[3];
  782.  
  783. #include "configstrings.h"
  784.  
  785. #include "functions.h"
  786.  
  787.